<template>
	<div class="error">
		<div class="content">
			<div class="text">401</div>
      <div class="sub-text">您未被授权，没有操作权限~</div>
			<div class="btn" @click="onSetAuth">重新加载</div>
		</div>
	</div>
</template>

<script setup lang="ts" name="noPower">
import Cookies from '/@/utils/Cookies';

const onSetAuth = () => {
	// 清除缓存/token等
	Cookies.clear();
	// 使用 reload 时，不需要调用 resetRoute() 重置路由
	window.location.reload();
};
</script>

<style scoped lang="scss">
.error {
	height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text {
  font-size: 56px;
  text-align: center;
}

.sub-text {
  font-size: 24px;
  margin-top: 10px;
}

.btn {
  background: #3061f2;
  color: #fff;
  text-align: center;
  line-height: 32px;
  border-radius: 16px;
  margin: auto;
  margin-top: 20px;
  width: 120px;
  cursor: pointer;
}
</style>
